#ifndef QSERIALIZEDPROPERTY_H
#define QSERIALIZEDPROPERTY_H

#include "QtPropertyExplorerLib.h"

#include <QString>
#include <QList>
#include <QVariant>

#include "QProperty.h"
#include "QPropertySet.h"

namespace QPE {


class QTPROPERTYEXPLORER_DLL_EXPORT QSerializedProperty
{
public:
	//! Constructor
	QSerializedProperty();

	//! Constructor
	QSerializedProperty(const QProperty* property, const QPropertySet* set);

	//! Constructor
	QSerializedProperty(const QProperty* property, const QString& id, const QPropertySet* set);

	//! Constructor
	QSerializedProperty(const QString& id, const QString& type, const QVariant& value);

	//! Destructor
	~QSerializedProperty();

	//! The property type
	QString ID;

	//! The property type
	QString Type;

	//! The serialized value of the property
	QVariant Value;

	//! List of child properties
	QList<QSerializedProperty> Children;

private:
	void initChildren(const QProperty* property, const QPropertySet* set);
};

}

#endif // QSERIALIZEDPROPERTY_H
